/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link codes}.
 * </p>
 *
 * @author Cedric Nana
 * @see codes
 * @generated
 */
public class codesWrapper implements codes, ModelWrapper<codes> {
	public codesWrapper(codes codes) {
		_codes = codes;
	}

	@Override
	public Class<?> getModelClass() {
		return codes.class;
	}

	@Override
	public String getModelClassName() {
		return codes.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("ID", getID());
		attributes.put("type", getType());
		attributes.put("codesystemname", getCodesystemname());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		Long ID = (Long)attributes.get("ID");

		if (ID != null) {
			setID(ID);
		}

		Long type = (Long)attributes.get("type");

		if (type != null) {
			setType(type);
		}

		String codesystemname = (String)attributes.get("codesystemname");

		if (codesystemname != null) {
			setCodesystemname(codesystemname);
		}
	}

	/**
	* Returns the primary key of this codes.
	*
	* @return the primary key of this codes
	*/
	@Override
	public long getPrimaryKey() {
		return _codes.getPrimaryKey();
	}

	/**
	* Sets the primary key of this codes.
	*
	* @param primaryKey the primary key of this codes
	*/
	@Override
	public void setPrimaryKey(long primaryKey) {
		_codes.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the i d of this codes.
	*
	* @return the i d of this codes
	*/
	@Override
	public long getID() {
		return _codes.getID();
	}

	/**
	* Sets the i d of this codes.
	*
	* @param ID the i d of this codes
	*/
	@Override
	public void setID(long ID) {
		_codes.setID(ID);
	}

	/**
	* Returns the type of this codes.
	*
	* @return the type of this codes
	*/
	@Override
	public long getType() {
		return _codes.getType();
	}

	/**
	* Sets the type of this codes.
	*
	* @param type the type of this codes
	*/
	@Override
	public void setType(long type) {
		_codes.setType(type);
	}

	/**
	* Returns the codesystemname of this codes.
	*
	* @return the codesystemname of this codes
	*/
	@Override
	public java.lang.String getCodesystemname() {
		return _codes.getCodesystemname();
	}

	/**
	* Sets the codesystemname of this codes.
	*
	* @param codesystemname the codesystemname of this codes
	*/
	@Override
	public void setCodesystemname(java.lang.String codesystemname) {
		_codes.setCodesystemname(codesystemname);
	}

	@Override
	public boolean isNew() {
		return _codes.isNew();
	}

	@Override
	public void setNew(boolean n) {
		_codes.setNew(n);
	}

	@Override
	public boolean isCachedModel() {
		return _codes.isCachedModel();
	}

	@Override
	public void setCachedModel(boolean cachedModel) {
		_codes.setCachedModel(cachedModel);
	}

	@Override
	public boolean isEscapedModel() {
		return _codes.isEscapedModel();
	}

	@Override
	public java.io.Serializable getPrimaryKeyObj() {
		return _codes.getPrimaryKeyObj();
	}

	@Override
	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_codes.setPrimaryKeyObj(primaryKeyObj);
	}

	@Override
	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _codes.getExpandoBridge();
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.model.BaseModel<?> baseModel) {
		_codes.setExpandoBridgeAttributes(baseModel);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
		_codes.setExpandoBridgeAttributes(expandoBridge);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_codes.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new codesWrapper((codes)_codes.clone());
	}

	@Override
	public int compareTo(
		de.hsmannheim.pepa.patientenportal.apanwep.model.codes codes) {
		return _codes.compareTo(codes);
	}

	@Override
	public int hashCode() {
		return _codes.hashCode();
	}

	@Override
	public com.liferay.portal.model.CacheModel<de.hsmannheim.pepa.patientenportal.apanwep.model.codes> toCacheModel() {
		return _codes.toCacheModel();
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.codes toEscapedModel() {
		return new codesWrapper(_codes.toEscapedModel());
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.codes toUnescapedModel() {
		return new codesWrapper(_codes.toUnescapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _codes.toString();
	}

	@Override
	public java.lang.String toXmlString() {
		return _codes.toXmlString();
	}

	@Override
	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_codes.persist();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof codesWrapper)) {
			return false;
		}

		codesWrapper codesWrapper = (codesWrapper)obj;

		if (Validator.equals(_codes, codesWrapper._codes)) {
			return true;
		}

		return false;
	}

	/**
	 * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
	 */
	public codes getWrappedcodes() {
		return _codes;
	}

	@Override
	public codes getWrappedModel() {
		return _codes;
	}

	@Override
	public void resetOriginalValues() {
		_codes.resetOriginalValues();
	}

	private codes _codes;
}